<?php

class PluginUsewatermark_HookUseWatermark extends Hook
{

    /**
     * Register hooks to upload image
     * 
     * @return void
     */
    public function RegisterHook()
    {
        $this->AddHook('engine_init_complete', 'AddWatermark');
    }

    /**
     * Add watermark to image
     *
     * @param array $aData
     * @return void
     */
    public function AddWatermark($aData)
    {
        if (isset($_POST['add_watermark']) && $_POST['add_watermark']) {
//                $watermarkText = Router::GetPath('profile') . $this->User_GetUserCurrent()->getLogin();
//                Config::Set('module.image.default.watermark_text', $watermarkText);
        } else {
                Config::Set('module.image.default.watermark_use', false);
                Config::Set('module.image.topic.watermark_use', false);
                Config::Set('module.image.foto.watermark_use', false);
        }
    }

}

?>